@import com.mgfireworks.mgplatform.mgadmin.product.model.Product
@extends("/form_template")
@args Boolean isEdit
@args Product product
@{
	if(product==null){
		product=new Product();
	}
}
       <div class="x_title row">
			<h2 class="col-xs-1">@if(isEdit){修改}else{添加}产品</h2>
			<div class="col-xs-11">
				<ul id="myTab" class="nav nav-tabs bar_tabs" role="tablist">
					<li role="presentation" class="active">
						<a href="#tab_content1" id="home-tab" role="tab" data-toggle="tab" aria-expanded="true">基本信息</a>
					</li>
					<li role="presentation" class="">
						<a href="#tab_content2" role="tab" id="profile-tab" data-toggle="tab" aria-expanded="false">产品详情</a>
					</li>
					<li role="presentation" class="">
						<a href="#tab_content3" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">其它信息</a>
					</li>
				</ul>
			</div>
       </div>
       <div class="x_content">
       	<div id="myTabContent" class="tab-content">
           <div role="tabpanel" class="tab-pane fade active in" id="tab_content1" aria-labelledby="home-tab">
	           	<div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="productId">产品编号<span class="required">*</span>
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="productId" name="productId" value="@product.getProductId()" placeholder="请输入产品编号" required="required" @if(isEdit&&true){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="productName">产品名<span class="required">*</span>
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="productName" name="productName" value="@product.getProductName()" placeholder="请输入产品名" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="cateId">类别<span class="required">*</span>
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="cateId" name="cateId" value="@product.getCateId()" placeholder="请输入类别" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="categoryName">类别名
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="categoryName" name="categoryName" value="@product.getCategoryName()" placeholder="请输入类别名"  @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="bandId">品牌<span class="required">*</span>
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="bandId" name="bandId" value="@product.getBandId()" placeholder="请输入品牌" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="bandName">品牌名
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="bandName" name="bandName" value="@product.getBandName()" placeholder="请输入品牌名"  @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainImg">主图片
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		         	<img class="product-main-img" src="@url("/)@product.getMainImg()"/>
		         	<div class="x_panel">
	                  <div class="x_title collapse-link">
	                    <button type="button" class="btn btn-primary btn-sm">上传图片</button>
	                    <ul class="nav navbar-right panel_toolbox">
	                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
	                    </ul>
	                    <div class="clearfix"></div>
	                  </div>
	                  <div class="x_content" style="display: none;">
			         	<input type="text" id="mainImg" name="mainImg" value="@product.getMainImg()" readonly="readonly" class="form-control col-md-7 col-xs-12">
			         	<div class="dropzone dz-clickable dz-started uploader-img"></div>
	                  </div>
	                </div>
		         	
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="sellLevel">销售级别<span class="required">*</span>
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="sellLevel" name="sellLevel" value="@product.getSellLevel()" placeholder="请输入销售级别" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="sellLevelName">销售级别名
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="sellLevelName" name="sellLevelName" value="@product.getSellLevelName()" placeholder="请输入销售级别名"  @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
		       <div class="form-group">
		         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="recommend">是否推荐<span class="required">*</span>
		         </label>
		         <div class="col-md-6 col-sm-6 col-xs-12">
		           <input type="text" id="recommend" name="recommend" value="@product.getRecommend()" placeholder="请输入是否推荐" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
		         </div>
		       </div>
           </div>
           <div role="tabpanel" class="tab-pane fade" id="tab_content2" aria-labelledby="profile-tab">
           		<div class="form-group">
			        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="description">描述<span class="required">*</span>
			        </label>
			        <div class="col-md-6 col-sm-6 col-xs-12">
			          <textarea type="text" id="description" name="description" value="@product.getProductId()" placeholder="请输入产品简要描述信息" required="required" class="form-control col-md-7 col-xs-12">
			          </textarea>
			        </div>
		  		</div>
           </div>
           <div role="tabpanel" class="tab-pane fade" id="tab_content3" aria-labelledby="profile-tab">
             <p>xxFood truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo
               booth letterpress, commodo enim craft beer mlkshk </p>
           </div>
         </div>
       
			
			<ul id="js-form-error-list" class="form-error-list row alert alert-danger alert-dismissible fade in">
				@errors("<li class=\"col-sm-4 label\">{0}</li>")
			</ul>
       </div>